package com.bobo.serviceaccount.controller;

import com.bobo.serviceaccount.dao.TbServiceAccountDao;
import com.bobo.serviceaccount.entry.TbServiceAccount;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author bobo
 * @date 2021-04-09
 */
@RestController
public class AccountController {

    @Autowired
    private TbServiceAccountDao tbServiceAccountDao;

    @GetMapping("/account")
    public String account() {
        TbServiceAccount tbServiceAccount = new TbServiceAccount();
        tbServiceAccount.setId(1);
        tbServiceAccount.setName("账户1");
        tbServiceAccountDao.insert(tbServiceAccount);
        return "success";
    }
}
